package com.hdax.dm.api.user;

import com.hdax.dm.entity.user.LinkUser;
import com.hdax.dm.entity.user.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "用户联系人模块")
public interface LinkUserControllerApi {

    @PostMapping(path = "/order/ticketbuyerlist")
    @ApiOperation(value = "用户联系人查询",notes = "查询该用户相关联系人")
    List<LinkUser> findByUserId(@RequestParam("userId")Long userId);

    @PostMapping(path = "/order/getById")
    @ApiOperation(value = "用户联系人查询",notes = "根据id查询信息")
    LinkUser getById(@RequestParam("id")Long id);

    @PostMapping(path = "/order/validatebuyerexist")
    @ApiOperation(value = "用户联系人查询",notes = "查询该联系人有没有被添加")
    boolean validatebuyerexist(@RequestParam("idCard")String idCard);

    @PostMapping(path = "/order/addticketbuyer")
    @ApiOperation(value = "用户联系人查询",notes = "添加用户联系人")
    boolean addticketbuyer(@RequestBody LinkUser linkUser);

}
